﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Sun.Mvc.BLL;
using Sun.Mvc.Models;

namespace Sun.Mvc.CMS.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            //BLL.Article articleBll = new BLL.Article();
            //Sun.Mvc.Models.Article articleModel = new Mvc.Models.Article();
            //articleModel.ArticleCoversId = 1;
            //articleModel.OperatorId = 1;
            //articleModel.Remark = "1111";
            //articleModel.Tag = "1,2,3,4,5";
            //articleModel.Titles = "坏蛋是怎样炼成的";
            //articleModel.Context = "坏蛋是怎样炼成的坏蛋是怎样炼成的";
            //articleModel.CreateTime = DateTime.Now;
            //articleBll.Insert(articleModel);

            //Tuple<string, string> tuple = Framework.Salt.HashSalt("123123");
            //BLL.Users usersBLL = new BLL.Users();
            //Mvc.Models.Users users = new Mvc.Models.Users();
            //users.UserName = "admin";
            //users.Salt = tuple.Item1;
            //users.PassWord = tuple.Item2;
            //users.CreateTime = DateTime.Now;

            //usersBLL.Insert(users);
            //string salt = tuple.Item1;
            //string pwd = tuple.Item1;

            return View();
        }
        /// <summary>
        /// 控制面板主页
        /// </summary>
        /// <returns></returns>
        public ActionResult Main()
        {
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}